Feature: 免费咨询的生命周期
  作为一个律团用户
  我可以咨询律师
  这样我可以得到我想知道的法律知识
  
Background:
Given http "accept" header is "application/json"
  And I make a "post" request to "login" with:
  | username    | password   |
  | 13702325511 | 123456   |
  And the response is in "json" format
  And http "authorization" header exists

Scenario: 普通用户可以成功创建咨询，并且上传文件
When I make a "post" request to "center/question/create/question" with:
  | cat_id    | title       |   content     |
  |  322      |  离婚财产咨询  | 您好，我和前夫离婚有4年了，离婚协议上房产归我，我补偿35万给他，他搬离。|
And the response is in "json" format
Then the response status code should be 201

Scenario: 普通用户可以成功取消咨询
When there is a "question" request with status "new"
And I "cancel" this request with route "center.question.to_cancel"
Then the response status code should be 200
And the status of the request is "cancelled"

Scenario: 普通用户可以成功删除被取消了的咨询
When there is a "question" request with status "new"
And I "cancel" this request with route "center.question.to_cancel"
Then the response status code should be 200
And the status of the request is "cancelled"
And I "cancel" this request with route "center.question.to_remove"
Then the response status code should be 200
And the status of the request is "removed"

Scenario: 普通用户可以成功删除已完成的咨询
When there is a "question" request with status "complete"
And I "cancel" this request with route "center.question.to_remove"
Then the response status code should be 200
And the status of the request is "removed"

Scenario: 普通用户可以获得咨询律师的及时通信的信息
When there is a "question" request with status "replied"
And I "ask" this request with route "center.question.to_ask"
Then the response status code should be 200
And the status of the request is "replied"
And the response is in "json" format
# TODO: check the data returned

Scenario: 普通用户可以确认咨询
When there is a "question" request with status "replied"
And I "complete" this request with route "center.question.to_confirm"
Then the response status code should be 200
And the status of the request is "wait_for_evaluation"
